package com.yj.ccs.abs.common.enums;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/3/20
 * Author     : Unbelievable9
 **/
public enum AssetLevelType {

    /**
     * 1 - 正常
     * 2 - 逾期
     * 3 - 关注
     * 4 - 次级
     * 5 - 违约
     */
    NORMAL(1),
    OVERDUE(2),
    FOCUS(3),
    SECONDARY(4),
    BREAK(5);

    private Integer value;

    AssetLevelType(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static AssetLevelType fromValue(Integer value) {
        for (AssetLevelType assetLevelType : AssetLevelType.values()) {
            if (assetLevelType.getValue().equals(value)) {
                return assetLevelType;
            }
        }

        return null;
    }
}
